package com.kgc.scd.bean;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class OrderExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public OrderExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOrderIdIsNull() {
            addCriterion("order_id is null");
            return (Criteria) this;
        }

        public Criteria andOrderIdIsNotNull() {
            addCriterion("order_id is not null");
            return (Criteria) this;
        }

        public Criteria andOrderIdEqualTo(String value) {
            addCriterion("order_id =", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotEqualTo(String value) {
            addCriterion("order_id <>", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThan(String value) {
            addCriterion("order_id >", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThanOrEqualTo(String value) {
            addCriterion("order_id >=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThan(String value) {
            addCriterion("order_id <", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThanOrEqualTo(String value) {
            addCriterion("order_id <=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLike(String value) {
            addCriterion("order_id like", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotLike(String value) {
            addCriterion("order_id not like", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdIn(List<String> values) {
            addCriterion("order_id in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotIn(List<String> values) {
            addCriterion("order_id not in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdBetween(String value1, String value2) {
            addCriterion("order_id between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotBetween(String value1, String value2) {
            addCriterion("order_id not between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderStateIsNull() {
            addCriterion("order_state is null");
            return (Criteria) this;
        }

        public Criteria andOrderStateIsNotNull() {
            addCriterion("order_state is not null");
            return (Criteria) this;
        }

        public Criteria andOrderStateEqualTo(Integer value) {
            addCriterion("order_state =", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotEqualTo(Integer value) {
            addCriterion("order_state <>", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateGreaterThan(Integer value) {
            addCriterion("order_state >", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("order_state >=", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateLessThan(Integer value) {
            addCriterion("order_state <", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateLessThanOrEqualTo(Integer value) {
            addCriterion("order_state <=", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateIn(List<Integer> values) {
            addCriterion("order_state in", values, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotIn(List<Integer> values) {
            addCriterion("order_state not in", values, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateBetween(Integer value1, Integer value2) {
            addCriterion("order_state between", value1, value2, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotBetween(Integer value1, Integer value2) {
            addCriterion("order_state not between", value1, value2, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidIsNull() {
            addCriterion("order_expressid is null");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidIsNotNull() {
            addCriterion("order_expressid is not null");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidEqualTo(String value) {
            addCriterion("order_expressid =", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidNotEqualTo(String value) {
            addCriterion("order_expressid <>", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidGreaterThan(String value) {
            addCriterion("order_expressid >", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidGreaterThanOrEqualTo(String value) {
            addCriterion("order_expressid >=", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidLessThan(String value) {
            addCriterion("order_expressid <", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidLessThanOrEqualTo(String value) {
            addCriterion("order_expressid <=", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidLike(String value) {
            addCriterion("order_expressid like", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidNotLike(String value) {
            addCriterion("order_expressid not like", value, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidIn(List<String> values) {
            addCriterion("order_expressid in", values, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidNotIn(List<String> values) {
            addCriterion("order_expressid not in", values, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidBetween(String value1, String value2) {
            addCriterion("order_expressid between", value1, value2, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderExpressidNotBetween(String value1, String value2) {
            addCriterion("order_expressid not between", value1, value2, "orderExpressid");
            return (Criteria) this;
        }

        public Criteria andOrderUidIsNull() {
            addCriterion("order_uid is null");
            return (Criteria) this;
        }

        public Criteria andOrderUidIsNotNull() {
            addCriterion("order_uid is not null");
            return (Criteria) this;
        }

        public Criteria andOrderUidEqualTo(String value) {
            addCriterion("order_uid =", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidNotEqualTo(String value) {
            addCriterion("order_uid <>", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidGreaterThan(String value) {
            addCriterion("order_uid >", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidGreaterThanOrEqualTo(String value) {
            addCriterion("order_uid >=", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidLessThan(String value) {
            addCriterion("order_uid <", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidLessThanOrEqualTo(String value) {
            addCriterion("order_uid <=", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidLike(String value) {
            addCriterion("order_uid like", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidNotLike(String value) {
            addCriterion("order_uid not like", value, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidIn(List<String> values) {
            addCriterion("order_uid in", values, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidNotIn(List<String> values) {
            addCriterion("order_uid not in", values, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidBetween(String value1, String value2) {
            addCriterion("order_uid between", value1, value2, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderUidNotBetween(String value1, String value2) {
            addCriterion("order_uid not between", value1, value2, "orderUid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridIsNull() {
            addCriterion("order_addrid is null");
            return (Criteria) this;
        }

        public Criteria andOrderAddridIsNotNull() {
            addCriterion("order_addrid is not null");
            return (Criteria) this;
        }

        public Criteria andOrderAddridEqualTo(String value) {
            addCriterion("order_addrid =", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridNotEqualTo(String value) {
            addCriterion("order_addrid <>", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridGreaterThan(String value) {
            addCriterion("order_addrid >", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridGreaterThanOrEqualTo(String value) {
            addCriterion("order_addrid >=", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridLessThan(String value) {
            addCriterion("order_addrid <", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridLessThanOrEqualTo(String value) {
            addCriterion("order_addrid <=", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridLike(String value) {
            addCriterion("order_addrid like", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridNotLike(String value) {
            addCriterion("order_addrid not like", value, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridIn(List<String> values) {
            addCriterion("order_addrid in", values, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridNotIn(List<String> values) {
            addCriterion("order_addrid not in", values, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridBetween(String value1, String value2) {
            addCriterion("order_addrid between", value1, value2, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderAddridNotBetween(String value1, String value2) {
            addCriterion("order_addrid not between", value1, value2, "orderAddrid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidIsNull() {
            addCriterion("order_couid is null");
            return (Criteria) this;
        }

        public Criteria andOrderCouidIsNotNull() {
            addCriterion("order_couid is not null");
            return (Criteria) this;
        }

        public Criteria andOrderCouidEqualTo(Integer value) {
            addCriterion("order_couid =", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidNotEqualTo(Integer value) {
            addCriterion("order_couid <>", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidGreaterThan(Integer value) {
            addCriterion("order_couid >", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidGreaterThanOrEqualTo(Integer value) {
            addCriterion("order_couid >=", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidLessThan(Integer value) {
            addCriterion("order_couid <", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidLessThanOrEqualTo(Integer value) {
            addCriterion("order_couid <=", value, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidIn(List<Integer> values) {
            addCriterion("order_couid in", values, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidNotIn(List<Integer> values) {
            addCriterion("order_couid not in", values, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidBetween(Integer value1, Integer value2) {
            addCriterion("order_couid between", value1, value2, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderCouidNotBetween(Integer value1, Integer value2) {
            addCriterion("order_couid not between", value1, value2, "orderCouid");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNull() {
            addCriterion("order_totalprice is null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNotNull() {
            addCriterion("order_totalprice is not null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceEqualTo(BigDecimal value) {
            addCriterion("order_totalprice =", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotEqualTo(BigDecimal value) {
            addCriterion("order_totalprice <>", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThan(BigDecimal value) {
            addCriterion("order_totalprice >", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("order_totalprice >=", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThan(BigDecimal value) {
            addCriterion("order_totalprice <", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("order_totalprice <=", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIn(List<BigDecimal> values) {
            addCriterion("order_totalprice in", values, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotIn(List<BigDecimal> values) {
            addCriterion("order_totalprice not in", values, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("order_totalprice between", value1, value2, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("order_totalprice not between", value1, value2, "orderTotalprice");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}